package com.nullpointer.xchatfinal.adapter;

import java.util.List;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.nullpointer.xchatfinal.fragment.ViewResultFragment;
import com.nullpointer.xchatfinal.object.User;

public class ResultFindFriendAdapter extends FragmentPagerAdapter {
	private List<User> users;

	public ResultFindFriendAdapter(FragmentManager fm, List<User> users) {
		super(fm);
		this.users = users;
	}

	@Override
	public Fragment getItem(int pos) {
		return ViewResultFragment.newInstance(users.get(pos));
	}

	@Override
	public int getCount() {
		return users.size();
	}

}
